/**
 *
 */
package cn.edu.cqupt.cyExam.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.edu.cqupt.cyExam.myBatis.bean.User;
import cn.edu.cqupt.cyExam.myBatis.dao.UserMapper;



/**
 * @author 叶子烟吧
 * @param <getUserByusersAccountnumber1>
 * @param <getUserByusersAccountnumber1>
 *
 */
@Service
public class SettingService<getUserByusersAccountnumber, getUserByusersAccountnumber1> {


	@Resource
	private UserMapper usersMapper;

	public void updatePassWord(Integer userid,String PasswordByMD5) {


		usersMapper.updatePassWord(userid,PasswordByMD5);
	}

	@SuppressWarnings("hiding")
	public <getUserByusersAccountnumber> User getUserByusersAccountnumber(String usersAccountnumber) {
		return usersMapper.getUserByusersAccountnumber(usersAccountnumber);
	}
	public void info(User user) {

		String number = user.getUser_name();
		Integer id = usersMapper.getUserIdBycount(number);
		user.setUser_id(id);
		usersMapper.updateByPrimaryKeySelective(user);

	}

}
